package com.weirdor.mongo.exception;

import com.weirdor.mongo.exception.code.BaseErrorCode;

/**
 * @Author werdor
 * @Date 2021/11/9 11:41 上午
 **/
public class WInternalException extends BaseException {

    private static final long serialVersionUID = 1L;

    public WInternalException(BaseErrorCode errorCode) {
        // 未对参数验证，虽可能存在空指针异常，即使存在也是我们内部问题，下同
        this(errorCode, errorCode.toString());
    }

    public WInternalException(BaseErrorCode errorCode, String excMsg) {
        super(errorCode, excMsg);
    }

    public WInternalException(Throwable throwable, BaseErrorCode errorCode) {
        this(throwable, errorCode, errorCode.toString());
    }

    public WInternalException(Throwable throwable, BaseErrorCode errorCode, String excMsg) {
        super(throwable, errorCode, excMsg);
    }
}